﻿using System;
using HaloReachApi.Responses;

namespace HaloReachApi
{
    public class PlayerDetailsService : BaseReachApiJsonService<PlayerDetailsResponse>
    {
        private const string uri = "http://www.bungie.net/api/reach/reachapijson.svc/player/details/{0}/{1}/{2}";

        public PlayerDetailsService()
            : base()
        { }

        public PlayerDetailsService(string key)
            : base(key)
        { }

        public void GetPlayerDetailsWithStatsByMapAsync(string gamerTag)
        {
            StartServiceCall(String.Format(uri, "bymap", apiKey, gamerTag));
        }

        public void GetPlayerDetailsWithStatsByPlaylistAsync(string gamerTag)
        {
            StartServiceCall(String.Format(uri, "byplaylist", apiKey, gamerTag));
        }

        public void GetPlayerDetailsNoStatsAsync(string gamerTag)
        {
            StartServiceCall(String.Format(uri, "nostats", apiKey, gamerTag));
        }
    }
}
